import request from "@/utils/request";
export const getTypeListAPi = () => {
  return request({
    url: "/carfilm.CompanyModule/getModuleTypes",
    method: "get",
  });
};

//添加类型
export const addModuleTypeAPi = (data?: any) => {
  return request({
    url: `/carfilm.CompanyModule/addModuleType`,
    method: "post",
    data: data,
  });
};

//编辑类型
export const editModuleTypeAPi = (data?: any) => {
  return request({
    url: `/carfilm.CompanyModule/updateModuleType`,
    method: "post",
    data: data,
  });
};

//删除类型
export const delModuleTypeAPi = (type_id: number) => {
  return request({
    url: `/carfilm.CompanyModule/deleteModuleType`,
    method: "delete",
    params: { type_id },
  });
};

export const getListAPi = (data?: any) => {
  return request({
    url: `/carfilm.CompanyModule/getModuleList`,
    method: "get",
    params: data,
  });
};

export const delModuleApi = (module_id: number) => {
  return request({
    url: `/carfilm.CompanyModule/deleteModule`,
    method: "delete",
    params: { module_id },
  });
};

export const addModuleApi = (data: any) => {
  return request({
    url: `/carfilm.CompanyModule/addModule`,
    method: "post",
    data,
  });
};

export const editModuleApi = (data: any) => {
  return request({
    url: `/carfilm.CompanyModule/updateModule`,
    method: "post",
    data,
  });
};
